﻿
package extremefx.storage {
	import flash.net.URLLoaderDataFormat;
	import flash.net.URLRequest;
	import flash.utils.ByteArray;		

	/**
	 * @author Marcelo Volmaro
	 */
	public class ByteLoader extends GLoader {
		private var _bytes:ByteArray;

		public function ByteLoader(pUrl:URLRequest) {
			super(pUrl);
			_fmt = URLLoaderDataFormat.BINARY;
			_bytes = null;
		}

		override protected function _onLoadComplete():void{
			_bytes = _loader.data as ByteArray;
		}
		
		public function get bytes():ByteArray { 
			return _bytes; 
		}
	}
}
